import { HashRouter, Routes, Route, Navigate } from "react-router-dom";
import { lazy, Suspense } from 'react'
const Index = lazy(() => import('../pages/index'));
const Login = lazy(() => import('../pages/login/login'));
const Home = lazy(() => import('../pages/home'))
const Category = lazy(() => import('../pages/category/category'))
const Proguct = lazy(() => import('../pages/proguct/proguct'))
const Cart = lazy(() => import('../pages/cart/cart'))
const User = lazy(() => import('../baidu/user)' 就能)
const BasicRoute = () => (
    <HashRouter>
        <Suspense fallback={''}>
            <Routes>
                {/* <Route path="/" element={<Navigate to='/home'></Navigate>}></Route>
                <Route path='/' element={< Index />}>
                    <Route path='' element={<Home />}></Route>
                    <Route path='home' element={<Home />}></Route>
                    <Route path='category/:id' element={<Category />}></Route>
                    <Route path='proguct/:id' element={<Proguct />}></Route>
                    <Route path='cart' element={<Cart />}></Route>
                </Route>
                <Route path='login' element={<Login />}></Route> */}



                <Route path="/" element={<User />}></Route>


            </Routes>
        </Suspense>
    </HashRouter>
);
export default BasicRoute;
